bitkeeper revision 1.1159.1.28 (41187b95qq9FYQ9PqtZM83wzpOUnlw)
authoriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Tue, 10 Aug 2004 07:39:01 +0000 (07:39 +0000)
committeriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Tue, 10 Aug 2004 07:39:01 +0000 (07:39 +0000)
cleanups

linux-2.4.26-xen-sparse/arch/xen/kernel/setup.c
linux-2.6.7-xen-sparse/arch/xen/i386/kernel/setup.c
linux-2.6.7-xen-sparse/drivers/xen/blkfront/blkfront.c
tools/misc/xen-clone

index 41edb54702729bbabcd43154c13c38517e9e79b8..c218d199d154c4beaa54b886c684bfac81e18a60 100644 (file)
@@ -377,16 +377,9 @@ void __init setup_arch(char **cmdline_p)
         pfn_to_mfn_frame_list[j] = 
             virt_to_machine(&phys_to_machine_mapping[i]) >> PAGE_SHIFT;
     }
-//pfn_to_mfn_frame_list[0] = 0xdeadbeff;
-printk("Hsi %lx %lx :: %lx\n",    pfn_to_mfn_frame_list,
-       virt_to_machine(pfn_to_mfn_frame_list),
-HYPERVISOR_shared_info->arch.mfn_to_pfn_start
-       );
     HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list =
        virt_to_machine(pfn_to_mfn_frame_list) >> PAGE_SHIFT;
 
-
-
     /* If we are a privileged guest OS then we should request IO privileges. */
     if ( start_info.flags & SIF_PRIVILEGED ) 
     {
index c3a3de1337af2a88708366a5bafa1e0e0ce7a60f..64cf45c49d8144296ec680c2c299afa86867d6be 100644 (file)
@@ -139,7 +139,7 @@ static struct resource data_resource = { "Kernel data", 0, 0 };
 shared_info_t *HYPERVISOR_shared_info = (shared_info_t *)empty_zero_page;
 EXPORT_SYMBOL(HYPERVISOR_shared_info);
 
-unsigned long *phys_to_machine_mapping;
+unsigned long *phys_to_machine_mapping, *pfn_to_mfn_frame_list;
 EXPORT_SYMBOL(phys_to_machine_mapping);
 
 multicall_entry_t multicall_list[8];
@@ -1098,7 +1098,9 @@ __setup("noreplacement", noreplacement_setup);
  */
 void __init setup_arch(char **cmdline_p)
 {
-       unsigned long max_low_pfn;
+        int i,j;
+
+        unsigned long max_low_pfn;
 
        HYPERVISOR_vm_assist(VMASST_CMD_enable,
                             VMASST_TYPE_4gb_segments);
@@ -1188,6 +1190,16 @@ void __init setup_arch(char **cmdline_p)
 #endif
        paging_init();
 
+       pfn_to_mfn_frame_list = alloc_bootmem_low_pages(PAGE_SIZE);
+       for ( i=0, j=0; i < max_pfn; i+=(PAGE_SIZE/sizeof(unsigned long)), j++ )
+       {       
+            pfn_to_mfn_frame_list[j] = 
+                 virt_to_machine(&phys_to_machine_mapping[i]) >> PAGE_SHIFT;
+       }
+       HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list =
+            virt_to_machine(pfn_to_mfn_frame_list) >> PAGE_SHIFT;
+
+
 #ifdef CONFIG_EARLY_PRINTK
        {
                char *s = strstr(*cmdline_p, "earlyprintk=");
index 59f5e12d68b3956c2bdb17df2fa18f7944bce262..9d326f6a3520cc5fca56671b121d75a1489aca2c 100644 (file)
@@ -304,22 +304,28 @@ static void kick_pending_request_queues(void)
 
 
 /* Upon block read completion, issue a dummy machphys update for the
-pages in the buffer, just in case we're being migrated. */
+pages in the buffer, just in case we're being migrated. 
+THIS CODE SHOULD BE REMOVED WHEN WE HAVE GRANT TABLES */
 
-static void blkif_read_completion(struct request *req)
+static void blkif_completion(blkif_response_t *bret, struct request *req)
 {
+#if 0
        struct bio *bio;
        struct bio_vec *bvec;
        int idx;
-       unsigned long mfn, pfn
+       unsigned long mfn, pfn;
 
-       rq_for_each_bio(bio, req) {
+       if( bret->operation == BLKIF_OP_READ )
+       {
+           rq_for_each_bio(bio, req) {
                bio_for_each_segment(bvec, bio, idx) {
                    mfn = page_to_phys(bvec->bv_page)>>PAGE_SHIFT;
                    pfn = machine_to_phys_mapping[mfn];
                    queue_machphys_update(mfn, pfn);
                }
+           }
        }
+#endif
 }
 
 
@@ -354,9 +360,7 @@ static irqreturn_t blkif_int(int irq, void *dev_id, struct pt_regs *ptregs)
                                BUG();
 
                        end_that_request_last(req);
-
-                       if( bret->operation == BLKIF_OP_READ )
-                           blkif_read_completion( req );
+                       blkif_completion( bret, req );
                        break;
                 case BLKIF_OP_PROBE:
                         memcpy(&blkif_control_rsp, bret, sizeof(*bret));
index b5e857f18382668cff948043578937ad3ad46795..cfcd3e4e06749484c7f6fd7c0babc3da83a72818 100755 (executable)
@@ -75,6 +75,7 @@ then
  cd ${DEST_BK_REP} 
  ln -sf ../install install
  make -j4 world
+ make -j4 linux26
  cd ../install/boot
  [ -r vmlinuz-${LINUX_VER}-xen0 ] && ln -s vmlinuz-${LINUX_VER}-xen0 xenolinux.gz